<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
    <script src="../static/js/vue.js"></script>
</head>
<body>
<div id="app">
    <input type="text" v-model="userName">
    <input type="password" v-model="passWord">
    <button @click="login">登陆</button>
</div>

</body>
<script>
    var app=new Vue({
        el:'#app',
        data:{
            userName:'',
            passWord:''
        },
        methods: {
            login: function () {
               alert(app.userName);
            }
        }
    })
</script>
</html>